﻿<%@ Page Language="C#" %>

<%@ Import Namespace="Obsidian.Config" %>
<%@ Import Namespace="Obsidian.Web" %>
<%@ Import Namespace="Obsidian.Mvc" %>
<%@ Import Namespace="[#ApiNS#]" %>
<%@ Import Namespace="" %>
<%
	//AppConfig.xml的<extend>节点相关配置
    //string HOME_URL = AppConfig.ExtendValue("首页URL配置");	//首页URL
    OView viewCurr = OView.CurrentView;	//对应Ctrl的当前视图
    //OView viewTopBar = (OView)viewCurr.GetData("viewTopBar");	//顶部
    //OView viewHeader = (OView)viewCurr.GetData("viewHeader");	//头部
    //OView viewFooter = (OView)viewCurr.GetData("viewFooter");	//底部

	Entity e[#ClsName#] = null;	//单个：明细
	if(!viewCurr.TryGetData<Entity>("e[#ClsName#]", out e[#ClsName#]))
	{
		e[#ClsName#] = new Entity();
	}

    EntitySet es[#ClsName#]s = null;	//多个：列表
	if (!viewCurr.TryGetData<EntitySet>("es[#ClsName#]s", out es[#ClsName#]s))
    {
        esWebGames = new EntitySet();
    }

    Entity eListAttr = (Entity)viewCurr.GetData("esListAttr");	//分页属性实体
    Entity e[#ClsName#]Qry = (Entity)viewCurr.GetData("es[#ClsName#]Qry");	//查询条件实体

	/** 以下为分页控件相关
    int pageNo = Convert.ToInt32(eListAttr["pageNo"]);
    int pagesCount = Convert.ToInt32(eListAttr["pagesCount"]);
    Obsidian.Web.Ui.PagingBar pagingBar = new Obsidian.Web.Ui.PagingBar("pageNo", pageNo, pagesCount);
    pagingBar.ShowNum = 7;	//页面显示的页码跳转块数量
	**/
%>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <link rel="shortcut icon" href="">
    <link href="" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src=""></script>
    <%=JsLibrary.IncludeHtml("onyx")%>
    <title>网页标题</title>
</head>

<body>

    <%
		//顶部和头部
        viewTopBar.Display();
        viewHeader.Display();
    %>
	
    <div>
        <div>
			<!--前端页面代码 + 你的代码 -->
		</div>
		
		<% /** 分页控件：如果有
        <div class="page" align="center">
            <%
                Entity qry = e[#ClsName#]Qry.Clone();
                qry.Remove("pageNo");
                string pagingUrl = [#ClsName#]Ctrl.Create[#ClsName#]ListUrl(qry);
            %>
            <%=pagingBar.Generate(pagingUrl)%>
        </div>
		**/ %>
    </div>
	
    <%
		//底部
		viewFooter.Display(); 
	%>

</body>
</html>
